<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>显示层级</title>
    <style>
        #d1{
            width: 100px;height: 50px;
            background-color: red;
            position: absolute;
            /* 设置显示的顺序:z-index: 的值相同谁在后显示越靠前
            值不同值越大显示越靠前
            ; */
            z-index: 1;
        }
        #d2{
            width: 50px;height: 100px;
            background-color: blue;
            position: absolute;
            z-index: 0;
        }
    </style>
</head>
<body>
    <div id="d1"></div>
    <div id="d2"></div>
</body>
</html>